<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title></title>
    <script type="text/javascript">
       var startDate = new Date();
    </script>
    <link rel="stylesheet" href="http://udacity-crp.herokuapp.com/style.css?rtt=2" media="none" id="testLink"/>
    <script type="text/javascript">
        console.log(new Date() - startDate);
        document.querySelector("#testLink").addEventListener("load",function(){
            console.log("change");
            this.setAttribute("media","all");
        });

        window.addEventListener("DOMContentLoaded",function(){
            document.querySelector("#test").style.color="red";
        });
    </script>
</head>
<body>
    <p id="test">
        test
    </p>
</body>
</html>